#include "MultiMediaRegister.h"
#include <vector>
#include <iostream>
#include <string>


MultiMediaRegister::MultiMediaRegister(void)
{
	registry.clear();
}


MultiMediaRegister::~MultiMediaRegister(void)
{
}

void MultiMediaRegister::AddMedia(MultiMedia &multi){registry.push_back(multi);}
void MultiMediaRegister::DeleteMedia(int index){registry.erase(registry.begin() +index);}
void MultiMediaRegister::SearchByTitle()
{
	string title;
	cout << "Title? ";
	cin >> title;
	for (int i = 0; i < registry.size(); i++) {
		if (registry[i].GetTitle() == title)
			cout << registry[i] << endl;
	}
}
